package com.jbm.onehome.iface;

import javax.persistence.*;
import com.jbm.core.iface.IAcross;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-04-25.
 */
@Entity
@Table(name = "verify_code", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class VerifyCodeEntity extends IAcross
{
	public VerifyCodeEntity()
	{
		super();
	}

	public VerifyCodeEntity(IAcross ia)
	{
		super(ia);
	}

    private static final long serialVersionUID = -2594984689053053804L;
    private int vcodeId;
    private String vcode;
    private String vvalue;
    private String vtype;
    private String status;
    private int createId;
    private Timestamp expireDate;
    private Timestamp createDate;

    @Id
    @Column(name = "vcode_id")
    @GeneratedValue
    public int getVcodeId() {
        return vcodeId;
    }

    public void setVcodeId(int vcodeId) {
        this.vcodeId = vcodeId;
    }

    @Basic
    @Column(name = "vcode")
    public String getVcode() {
        return vcode;
    }

    public void setVcode(String vcode) {
        this.vcode = vcode;
    }

    @Basic
    @Column(name = "vvalue")
    public String getVvalue() {
        return vvalue;
    }

    public void setVvalue(String vvalue) {
        this.vvalue = vvalue;
    }

    @Basic
    @Column(name = "vtype")
    public String getVtype() {
        return vtype;
    }

    public void setVtype(String vtype) {
        this.vtype = vtype;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VerifyCodeEntity that = (VerifyCodeEntity) o;

        if (createId != that.createId) return false;
        if (vcodeId != that.vcodeId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (vcode != null ? !vcode.equals(that.vcode) : that.vcode != null) return false;
        if (vtype != null ? !vtype.equals(that.vtype) : that.vtype != null) return false;
        if (vvalue != null ? !vvalue.equals(that.vvalue) : that.vvalue != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = vcodeId;
        result = 31 * result + (vcode != null ? vcode.hashCode() : 0);
        result = 31 * result + (vvalue != null ? vvalue.hashCode() : 0);
        result = 31 * result + (vtype != null ? vtype.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }

    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
}
